home *** CD-ROM | disk | FTP | other *** search
- property ancestor, fTapeTable, fTapeList
- global kNumRooms, kNumGirlsInRoom, kRoomNames
-
- on birth me
- set ancestor to NewObj("TLayer")
- mITapeLayer(me)
- return me
- end
-
- on mITapeLayer me
- mITapes(me)
- mITapeTable(me)
- end
-
- on mITapes me
- set fTapeList to []
- set aSpr to 37
- repeat with aTapeCount = 1 to kNumRooms * kNumGirlsInRoom
- set aTape to mNewView(me, "TTape", aSpr + aTapeCount - 1, "Tape" & aTapeCount)
- add(fTapeList, aTape)
- mOffStage(aTape)
- end repeat
- updateStage()
- end
-
- on mITapeTable me
- set fTapeTable to [#temp: 0]
- repeat with aRoomCount = 1 to kNumRooms
- set aRoomName to getAt(kRoomNames, aRoomCount)
- addProp(fTapeTable, "#" & aRoomName, [0, 0, 0, 0])
- end repeat
- end
-
- on mIsDeadCkrch me, vRoomName, vCkrchNum
- set aCkrchList to getaProp(fTapeTable, "#" & vRoomName)
- if getAt(aCkrchList, vCkrchNum) = 1 then
- return 1
- else
- return 0
- end if
- end
-
- on mHitCkrch me, aRoomName, aCkrchNum
- set aCkrchList to getaProp(fTapeTable, "#" & aRoomName)
- setAt(aCkrchList, aCkrchNum, 1)
- setProp(fTapeTable, "#" & aRoomName, aCkrchList)
- mPutTapeOnStage(me, aRoomName, aCkrchNum)
- end
-
- on mPutTapeOnStage me, vRoomName, vCkrchNum
- mAppearTape(mGtEmptyTape(me), vRoomName, vCkrchNum)
- end
-
- on mGtEmptyTape me
- repeat with aTapeCount = 1 to count(fTapeList)
- set aTape to getAt(fTapeList, aTapeCount)
- if not mIsExistOnStage(aTape) then
- return aTape
- end if
- end repeat
- return 0
- end
-